#ifndef __Math__LevelManager__
#define __Math__LevelManager__

#include "cocos2d.h"
#include "ui/CocosGUI.h"
#include "../../GameConfig.h"

USING_NS_CC;
using namespace ui;
class LevelManager : public cocos2d::Layer
{
private:
	Size m_screenSize;
	Node* m_panel;
	Vector<Button*> m_pages;
    Point m_pTouchBegan;
	int m_currPage;
	int m_numPage;
	float m_paddingWidth;
	float m_paddingHeight;
    bool m_isTouch;
	void initBackground();
	void initButton();
	void initPanel();
    
	void tapBack();
	void tapPage(Ref* pSender);

    virtual bool onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *event);
	//virtual void onTouchMove(cocos2d::Touch *touch, cocos2d::Event *event);
	virtual void onTouchEnded(cocos2d::Touch *touch, cocos2d::Event *event);
	virtual void onKeyReleased(EventKeyboard::KeyCode keyCode, Event* event);
public:
	static bool s_isActive;
	static EGameMode s_mode;
	static int s_ID;
	~LevelManager();
	void initalize();

	static Scene* createScene();
	virtual bool init();
	CREATE_FUNC(LevelManager);
};
#endif 